import { getEnergyAnalyzeEnterpriseReport } from '@/api/energy';

export default {
  data () {
    return {
      enterpriseReportData: [],
      tips: [
        '月单位产值综合能耗=综合能耗÷工业总产值',
        '月单位综合能耗产值=工业总产值÷综合能耗',
        '工业总产值÷增加值',
      ],
    }
  },
  methods: {
    async getEnterpriseReportData () {
      const enterpriseId = this.$route.query.enterpriseId;
      if (!enterpriseId) {
        // console.warn(`[getEnterpriseReportData]: enterpriseId is ${enterpriseId}`);
        return;
      }
      try {
        const { data } = await getEnergyAnalyzeEnterpriseReport(enterpriseId);
        this.enterpriseReportData = data;
     } catch (e) {
      console.warn(e);
     }
    }
  }
}
